﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace AutoWizard.Meta
{
    public class PropertyMeta
    {
        public PropertyMeta()
        {
        }

        public PropertyMeta(string fieldName)
        {
            m_fieldName = fieldName;
        }

        #region Name

        string m_fieldName;
        public string Name
        {
            get { return m_fieldName; }
            set { m_fieldName = value; }
        }

        #endregion

        #region IsKey

        private bool m_isKey = false;

        public bool IsKey
        {
            get { return m_isKey; }
            set { m_isKey = value; }
        }

        #endregion

        #region DbType

        SqlDbType m_dbType;

        public SqlDbType DbType
        {
            get { return m_dbType; }
            set { m_dbType = value; }
        }

        #endregion

        #region TextLimitLength

        int m_textLimitLength = 0;

        public int TextLimitLength
        {
            get { return m_textLimitLength; }
            set { m_textLimitLength = value; }
        }

        #endregion

        #region MoneyPrecision

        int m_moneyPrecision = 0;

        public int MoneyPrecision
        {
            get { return m_moneyPrecision; }
            set { m_moneyPrecision = value; }
        }

        #endregion

        #region MoneyScale

        int m_moneyScale = 0;

        public int MoneyScale
        {
            get { return m_moneyScale; }
            set { m_moneyScale = value; }
        }

        #endregion

        #region CanNull

        private bool m_CanNull = false;

        public bool CanNull
        {
            get { return m_CanNull; }
            set { m_CanNull = value; }
        }

        #endregion

        #region DefaultValue

        string m_defaultValue;

        public string DefaultValue
        {
            get { return m_defaultValue; }
            set { m_defaultValue = value; }
        }

        #endregion

        #region DescInfo

        string m_descInfo;

        public string DescInfo
        {
            get { return m_descInfo; }
            set { m_descInfo = value; }
        }

        #endregion

        #region IsForigenKey

        private bool m_isForigenKey = false;

        public bool IsForigenKey
        {
            get { return m_isForigenKey; }
            set { m_isForigenKey = value; }
        }

        #endregion

        #region MasterTable

        string m_MasterTable;

        public string MasterTable
        {
            get { return m_MasterTable; }
            set { m_MasterTable = value; }
        }

        #endregion

        #region MasterField

        private string m_MasterField;

        public string MasterField
        {
            get { return m_MasterField; }
            set { m_MasterField = value; }
        }

        #endregion

        #region IsAssociation

        private bool m_IsAssociation = false;

        public bool IsAssociation
        {
            get { return m_IsAssociation; }
            set { m_IsAssociation = value; }
        }

        #endregion

        #region DetailTable

        string m_DetailTable;

        public string DetailTable
        {
            get { return m_DetailTable; }
            set { m_DetailTable = value; }
        }

        #endregion

        #region UIMetaInfo

        UIMeta m_UIMeta = new UIMeta();

        public UIMeta UIMetaInfo
        {
            get { return m_UIMeta; }
            set { m_UIMeta = value; }
        }

        #endregion


        #region IsEnum

        private bool m_IsEnum = false;
        // 是否枚举类型
        public bool IsEnum
        {
            get { return m_IsEnum; }
            set { m_IsEnum = value; }
        }

        #endregion

        #region EnumType

        string m_EnumType;
        // 枚举类型
        public string EnumType
        {
            get { return m_EnumType; }
            set { m_EnumType = value; }
        }

        #endregion

        #region Validators

        List<ValidatorMeta> m_Validators = new List<ValidatorMeta>();

        public List<ValidatorMeta> Validators
        {
            get { return m_Validators; }
            set { m_Validators = value; }
        }


        #endregion
    }
}
